<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="../org/angular.min.js"></script>
		<script type="text/javascript" src="../org/jquery.min.js" ></script>
	</head>
	<body>
		<div ng-app="hd" ng-controller="ctrl">
			<form method="post" action="form.php">
				标题：<input type="text" ng-model="filed.title"><br />
				点击数：<input type="text" ng-model='filed.click'><br />
				内容：<input type="text" ng-model="filed.content" /><br />
				<textarea name="data"></textarea><br />
				<input type='submit'>
			</form>
		</div>
		<script>
			var m = angular.module("hd",[]);
			m.controller('ctrl',['$scope',function($scope){
//				本地存储数据
//              $scope.data = {name: "ysc"};
//              localStorage.setItem('data',angular.toJson($scope.data));
                $scope.filed = {title:'renren', click: 100 ,content:'人人'}
                $('form').submit(function(){
                	$("[name='data']").val(angular.toJson($scope.filed));
                	
                })
			}]);
		</script>
	</body>
</html>
